﻿using IntoMes.Global;
using IntoMes.Models;
using Prism.Mvvm;
using System.Collections.ObjectModel;

namespace IntoMes.ViewModels
{
    public class StationStatusViewModel : BindableBase
    {
        public ObservableCollection<StationStatusModel> Status { get; set; } = new ObservableCollection<StationStatusModel>();
        public SparePartsManageViewModel SparePartsManage => Locator.Instance.SparePartsManage;


        #region 属性 

        private string _CurModel;
        /// <summary>
        /// 属性
        /// </summary>
        public string CurModel
        {
            get { return _CurModel; }
            set
            {
                _CurModel = value;
                RaisePropertyChanged("CurModel");
            }
        }
        #endregion 

        #region 属性 

        private string _CurBc;
        /// <summary>
        /// 属性
        /// </summary>
        public string CurBc
        {
            get { return _CurBc; }
            set
            {
                _CurBc = value;
                RaisePropertyChanged("CurBc");
            }
        }
        #endregion 

        public StationStatusViewModel()
        {
            for (int i = 0; i < 8; i++)
            {
                if (i < 6)
                {
                    Status.Add(new StationStatusModel()
                    {
                        RowHeader = $"OP{i + 1}0",
                    });
                }
                else if (i == 6)
                {
                    Status.Add(new StationStatusModel()
                    {
                        RowHeader = $"减震装垫",
                    });

                }
                else
                {
                    Status.Add(new StationStatusModel()
                    {
                        RowHeader = $"GP12",
                    });
                }
            }
        }
    }
}
